<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>苞米面 C++ 模板库: bmm/string_algo.hpp 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">苞米面 C++ 模板库
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_3855b158c164314995fac6a2abe3aa9c.html">bmm</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">string_algo.hpp 文件参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>字符串一些算法  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="global_8hpp_source.html">global.hpp</a>&quot;</code><br />
</div>
<p><a href="string__algo_8hpp_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ae137eb03181b83d8743769f1a675dfd2"><td class="memTemplParams" colspan="2">template&lt;typename _InputIterator , typename _String &gt; </td></tr>
<tr class="memitem:ae137eb03181b83d8743769f1a675dfd2"><td class="memTemplItemLeft" align="right" valign="top">_String&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="string__algo_8hpp.html#ae137eb03181b83d8743769f1a675dfd2">string_join</a> (_InputIterator __first, _InputIterator __last, const _String &amp;__sep)</td></tr>
<tr class="memdesc:ae137eb03181b83d8743769f1a675dfd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">将一个范围内的字符串连接成一个字符串  <a href="string__algo_8hpp.html#ae137eb03181b83d8743769f1a675dfd2">更多...</a><br /></td></tr>
<tr class="separator:ae137eb03181b83d8743769f1a675dfd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d7ab60086dcea20a9abebbdc8cd1a1d"><td class="memTemplParams" colspan="2">template&lt;typename _ArrayT , typename _String &gt; </td></tr>
<tr class="memitem:a4d7ab60086dcea20a9abebbdc8cd1a1d"><td class="memTemplItemLeft" align="right" valign="top">_String&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="string__algo_8hpp.html#a4d7ab60086dcea20a9abebbdc8cd1a1d">string_join</a> (const _ArrayT &amp;__arr, const _String &amp;__sep)</td></tr>
<tr class="memdesc:a4d7ab60086dcea20a9abebbdc8cd1a1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">将一个容器内的字符串连接成一个字符串  <a href="string__algo_8hpp.html#a4d7ab60086dcea20a9abebbdc8cd1a1d">更多...</a><br /></td></tr>
<tr class="separator:a4d7ab60086dcea20a9abebbdc8cd1a1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fd0f54a47c71e1a31792859618f5ac4"><td class="memTemplParams" colspan="2">template&lt;typename _String , typename _ArrayT  = std::vector&lt;_String&gt;&gt; </td></tr>
<tr class="memitem:a6fd0f54a47c71e1a31792859618f5ac4"><td class="memTemplItemLeft" align="right" valign="top">_ArrayT&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="string__algo_8hpp.html#a6fd0f54a47c71e1a31792859618f5ac4">string_split</a> (const _String &amp;__s, const _String &amp;__sep)</td></tr>
<tr class="memdesc:a6fd0f54a47c71e1a31792859618f5ac4"><td class="mdescLeft">&#160;</td><td class="mdescRight">将一个字符串按照 __sep 分割成一个字符串容器  <a href="string__algo_8hpp.html#a6fd0f54a47c71e1a31792859618f5ac4">更多...</a><br /></td></tr>
<tr class="separator:a6fd0f54a47c71e1a31792859618f5ac4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>字符串一些算法 </p>
<p>LICENSE MulanPSL2 </p><dl class="section author"><dt>作者</dt><dd><a href="#" onclick="location.href='mai'+'lto:'+'cnh'+'em'+'iya'+'@q'+'q.c'+'om'; return false;">cnhem<span style="display: none;">.nosp@m.</span>iya@<span style="display: none;">.nosp@m.</span>qq.co<span style="display: none;">.nosp@m.</span>m</a> </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2022-02-18 10:22 </dd></dl>
</div><h2 class="groupheader">函数说明</h2>
<a id="ae137eb03181b83d8743769f1a675dfd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae137eb03181b83d8743769f1a675dfd2">&#9670;&nbsp;</a></span>string_join() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _InputIterator , typename _String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_BMM_NAMESPACE_BEGIN__String string_join </td>
          <td>(</td>
          <td class="paramtype">_InputIterator&#160;</td>
          <td class="paramname"><em>__first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">_InputIterator&#160;</td>
          <td class="paramname"><em>__last</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const _String &amp;&#160;</td>
          <td class="paramname"><em>__sep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将一个范围内的字符串连接成一个字符串 </p>
<p>返回的字符串中，每个字符串之间用 __sep 分隔</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">__first</td><td>范围的开始迭代器 </td></tr>
    <tr><td class="paramname">__last</td><td>范围的结束迭代器 </td></tr>
    <tr><td class="paramname">__sep</td><td>分隔符</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>连接后的字符串 </dd></dl>

</div>
</div>
<a id="a4d7ab60086dcea20a9abebbdc8cd1a1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d7ab60086dcea20a9abebbdc8cd1a1d">&#9670;&nbsp;</a></span>string_join() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _ArrayT , typename _String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_String string_join </td>
          <td>(</td>
          <td class="paramtype">const _ArrayT &amp;&#160;</td>
          <td class="paramname"><em>__arr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const _String &amp;&#160;</td>
          <td class="paramname"><em>__sep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将一个容器内的字符串连接成一个字符串 </p>
<p>返回的字符串中，每个字符串之间用 __sep 分隔， <br  />
必须是一个符合 STL 的容器类型，而且必须是一个类型为 _String 的容器</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">__arr</td><td>符合 STL 的容器类型 </td></tr>
    <tr><td class="paramname">__sep</td><td>分隔符</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>连接后的字符串 </dd></dl>

</div>
</div>
<a id="a6fd0f54a47c71e1a31792859618f5ac4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fd0f54a47c71e1a31792859618f5ac4">&#9670;&nbsp;</a></span>string_split()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _String , typename _ArrayT  = std::vector&lt;_String&gt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_ArrayT string_split </td>
          <td>(</td>
          <td class="paramtype">const _String &amp;&#160;</td>
          <td class="paramname"><em>__s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const _String &amp;&#160;</td>
          <td class="paramname"><em>__sep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将一个字符串按照 __sep 分割成一个字符串容器 </p>
<p>返回的字符串容器，符合 STL 的 std::vector 容器类型，而且必须是一个类型为 _String 的容器</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">__s</td><td>字符串 </td></tr>
    <tr><td class="paramname">__sep</td><td>分隔符</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>字符串容器 </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
